import { AxiosResponse } from "axios";
import axiosInstance from "./request";

export interface ProfileResponse {
  id: string;
  username: string;
  name: string;
  date: string;
  role: "admin" | "manager" | undefined;
  contact: string;
  email: null | string;
  gender: "secret" | "male" | "female" | "other";
}

export const getProfileReq = async (): Promise<
  AxiosResponse<ProfileResponse>
> => {
  const response: AxiosResponse<ProfileResponse> = await axiosInstance.get(
    "/user/profile"
  );
  return response;
};
